package com.zking.service.impl.lj;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zking.dao.domain.lj.Admin;
import com.zking.dao.mapper.lj.AdminMapper;
import com.zking.service.lj.AdminService;

@Service
public class AdminServicelmpl implements AdminService{
	
	@Autowired
	private AdminMapper adminMapper;
	
	//增加一个会员
	@Override
	public int addAdmin(Admin admin) {
		int i = adminMapper.addAdmin(admin);
		return i;
	}

	@Override
	public List<Admin> getAdmin() {
		List<Admin> list = adminMapper.getAdmin();
		return list;
	}

	@Override
	public int deleteAdmin(int i) {
		int a = adminMapper.deleteAdmin(i);
		return a;
	}

	@Override
	public Admin getadmin(Admin admin) {
		Admin admins = adminMapper.getadmin(admin);
 		return admins;
	}

	@Override
	public Admin getADMIN(Admin admin) {
		Admin admin2 = adminMapper.getADMIN(admin);
		return admin2;
	}

	@Override
	public int updateAdmin(Admin admin) {
		int i = adminMapper.updateAdmin(admin);
		return i;
	}

}
